
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: heapster-v1.0.2
  namespace: kube-system
  labels:
    k8s-app: heapster
    kubernetes.io/cluster-service: "true"
    version: v1.0.2
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: heapster
      version: v1.0.2
  template:
    metadata:
      labels:
        k8s-app: heapster
        version: v1.0.2
    spec:
      containers:
        - image: gcr.io/google_containers/heapster:v1.0.2
          name: heapster
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: {{ metrics_memory }}
            requests:
              cpu: 100m
              memory: {{ metrics_memory }}
          command:
            - /heapster
            - --source=kubernetes.summary_api:''
            - --sink=influxdb:http://monitoring-influxdb:8086
            - --metric_resolution=60s
        - image: gcr.io/google_containers/heapster:v1.0.2
          name: eventer
          resources:
            # keep request = limit to keep this container in guaranteed class
            limits:
              cpu: 100m
              memory: {{ eventer_memory }}
            requests:
              cpu: 100m
              memory: {{ eventer_memory }}
          command:
            - /eventer
            - --source=kubernetes:''
            - --sink=influxdb:http://monitoring-influxdb:8086
        - image: gcr.io/google_containers/addon-resizer:1.0
          name: heapster-nanny
          resources:
            limits:
              cpu: 50m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 100Mi
          env:
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          command:
            - /pod_nanny
            - --cpu=100m
            - --extra-cpu=0m
            - --memory={{ metrics_memory }}
            - --extra-memory={{ metrics_memory_per_node }}Mi
            - --threshold=5
            - --deployment=heapster-v1.0.2
            - --container=heapster
            - --poll-period=300000
        - image: gcr.io/google_containers/addon-resizer:1.0
          name: eventer-nanny
          resources:
            limits:
              cpu: 50m
              memory: 100Mi
            requests:
              cpu: 50m
              memory: 100Mi
          env:
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          command:
            - /pod_nanny
            - --cpu=100m
            - --extra-cpu=0m
            - --memory={{ eventer_memory }}
            - --extra-memory={{ eventer_memory_per_node }}Ki
            - --threshold=5
            - --deployment=heapster-v1.0.2
            - --container=eventer
            - --poll-period=300000

